# from django.utils.deprecation import MiddlewareMixin
#
#
# class MyMiddle(MiddlewareMixin):
#     def process_response(self, request, response):
#         response['Access-Control-Allow-Origin'] = '*'  # 允许所有url
#         if request.method == 'OPTIONS':  # 针对非简单请求
#             response['Access-Control-Allow-Headers'] = 'Content-type'
#         return response
